<template>
    <div id="app">
        <div>
            <div>
                <!-- 
                <div v-show="!isBind">
                    <h2>您尚未企业账号，请绑定后查看企业消息</h2>
                    <x-button type="primary" @click.native="goBind">去绑定</x-button>
                </div>
                 -->
                <div class="cont">
                    <router-view></router-view>
                </div>
            </div>
        </div>
        <loading v-model="isLoading"></loading>
    </div>
</template>

<script>
import { Loading } from 'vux'
import { mapState } from 'vuex'
import Bar from '@/components/Bar'
import { XButton } from 'vux'
export default {
    name: 'app',
    components: {
        Loading,
        Bar,
        XButton
    },
    mounted() {
    },
    computed: {
        ...mapState({
            isLoading: state => state.isLoading,
            isBind: state => state.isBind,
            dataArr: state => state.dataArr,
            testStr: state => state.testStr + ":::"
        })
    },
    methods: {
        checkLogin(){

        },
        goBind() {
            alert("i should run..");
            this.$router.push('/test');
        },
        changeState: function() {
            this.$store.state.testStr = '我是新值';
        },
        changeState1() {
            var tempArr = [
                {
                    name: "tony",
                    age: 32
                },
                {
                    name: "tony2",
                    age: 38
                }
            ]
            this.$store.commit('FILL_ARR', tempArr);
        }
    },

}
</script>

<style lang="less">
@import '~vux/src/styles/reset.less';
body,
html {
    height: 100%;
    width: 100%;
    overflow-x: hidden
}

#app {
    height: 100%;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}


.wrap {
    width: 9.333333rem;
    margin: 0px auto;
}

.h20 {
    height: 20px;
    overflow: hidden;
}

.flexWrapper {
    display: flex;
}

.flexWrapper .bar {
    flex: 0 0 120px;
}

.flexWrapper .cont {
    flex: 1 1 0;
}
</style>
